from django.http import HttpResponse
from django.shortcuts import render_to_response
from django.template import RequestContext

__author__ = 'czq'
def render_info(request,message):
    dict={'message':message}
    return render_to_response('HttpWrite/infoSuccess.html',dict,context_instance=RequestContext(request))

def operatSuccess(request,message):
    return render_info(request,message)
def operatFailure(request,message):
    return render_info(request,message)
def inputFailure(request,message):
    return render_info(request,message)
def modifySuccess(request,message):
    return render_info(request,message)
def infoSuccess(request,message):
    return render_info(request,message)
def infoFailure(request,message):
    return render_info(request,message)

def timeRedirect(message,url,time):
    html = '<html><head><meta http-equiv="refresh" content="%s;url=%s"></head><body>%s.</body></html>' % (time,url,message)
    return HttpResponse(html)